-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delegate date strings formatting to datetime.isoformat() #6413
Conversation
1eff662
to
1aaa7b3
Compare
@legoktm I'm trying to gather again the context around this PR. It seems like one of the API responses contains timestamps without time zone information (specific error in CI). I believe that's a legit test suite error and that we want to fix the API response to conform to the new convention, does that seem right to you? |
The SecureDrop SDK now supports date stings in ISO8061 format, so we can stop relying on custom-defined formats. The custom JSON formatter made this a one-line change! Co-authored-by: Kunal Mehta <[email protected]>
1aaa7b3
to
da8f43f
Compare
Tl;dr: This change does not have any side effects on time-zone support. It simply standardizes us to We decided in today's backlog-pruning session that this was worth revisiting in a time-box to see if we could finalize it. Substantively all I've done is rebase this from
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; I tested that the current client can handle the new ISO timestamp format just fine.
Wow. That was some time ago. 😮 |
Status
Ready for review
Description of Changes
Closes #6257 (see Proposed plan section in the description).
Changes proposed in this pull request:
datetime.isoformat()
instead (should be easier to use consistently too)Testing
Then test here:
And then check for surprises downstream:
make dev
here andmake regenerate-sdk-cassettes
infreedomofpress/securedrop-client/client
. It should pass.make test
infreedomofprses/securedrop-client/client
. It should pass.Deployment
Once this change has been released, the try/except logic in https://github.com/freedomofpress/securedrop-client/blob/7f7f60e67f7606708a6c9ef519c9657cd738be9e/client/securedrop_client/sdk/timestamps.py can be removed in favor of just
datetime.fromisoformat()
.Checklist
If you made changes to the server application code:
make lint
) and tests (make test
) pass in the development container